import instance from '../utils/request'

const getChannels = () => {
  return instance({
    method: 'get',
    url: '/v1_0/user/channels'
  })
}

const getArticles = ({ channel_id, timestamp }) => {
  return instance({
    method: 'get',
    url: '/v1_1/articles',
    params: {
      with_top: 1,
      channel_id,
      timestamp
    }
  })
}

export { getChannels, getArticles }
